package cn.com.twoke.game.server;

import cn.com.twoke.game.common.constants.MessageType;
import cn.com.twoke.game.server.handler.*;

public class Main {
    public static void main(String[] args) {
        GameServerManager gameServer = new GameServerManager();
        gameServer.on(MessageType.CONNECT, new LoginMessageHandler());
        gameServer.on(MessageType.LOGIN, new LoginMessageHandler());
        gameServer.on(MessageType.LOGOUT, new LogoutMessageHandler());
        gameServer.on(MessageType.INVITE_JOIN_GAME, new InviteJoinGameMessageHandler());
        gameServer.on(MessageType.START_GAME, new StartGameMessageHandler());
        gameServer.on(MessageType.GAME_CHAT, new GameChatMessageHandler());
        gameServer.on(MessageType.GAME_DATA, new GameDataMessageHandler());
        gameServer.on(MessageType.STOP_GAME, new StopGameMessageHandler());
        gameServer.run();
    }
}
